<?php
class PXFInstanceAdmin extends PXFInstance
{
	protected function __construct()
	{
		parent::__construct();
		// print_r(PXFInstance::$user);
		// exit();
	}

	public static function getInstance()
	{
		static $instance = null;
		if(is_null($instance))
		{
			$instance = new PXFInstanceAdmin();
		}
		return $instance;
	}

	public function response()
	{
		self::$controller = isset($_REQUEST['c']) ? $_REQUEST['c'] : PXFConfigAdmin::ADM_DEFAULT_CONTROLLER;
		self::$action 		= isset($_REQUEST['a']) ? $_REQUEST['a'] : 'index';

		/* Load modules and execute ADMIN action. */
		include(sprintf('%s/adm_modules/%s/controller.php',PXFConfigAdmin::ADM_PXF_SITE,self::$controller));
		$act = self::$action;
    $controller = new ControllerAdmin();
    $controller->$act();
	}
}
?>
